﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AlipayPay.Infrastructure.ExceptionExtensions
{
    /// <summary>
    /// 异常机制处理
    /// </summary>
    public class BusinessException : Exception
    {
        public BusinessException()
        {
        }


        public int Code { get; set; }

        /// <summary>
        /// 用户操作异常
        /// </summary>
        /// <param name="message">提示信息</param>
        /// <param name="code">状态码</param>
        public BusinessException(string message, int code = 201) : base(message)
        {
            Code = code;
        }
    }
}
